﻿Public Class SanPhamDT
    Private _ma As Integer
    Public Property MaLoai
        Get
            Return _ma
        End Get
        Set(ByVal value)
            _ma = value
        End Set
    End Property

    Private _ten As String
    Public Property TenLoai
        Get
            Return _ten
        End Get
        Set(ByVal value)
            _ten = value
        End Set
    End Property

    Private _trigia As Integer
    Public Property TriGia
        Get
            Return _trigia
        End Get
        Set(ByVal value)
            _trigia = value
        End Set
    End Property

    Private _donvitinh As Integer
    Public Property DonViTinh
        Get
            Return _donvitinh
        End Get
        Set(ByVal value)
            _donvitinh = value
        End Set
    End Property

    Private _tinhtrang As Integer
    Public Property TinhTrang
        Get
            Return _tinhtrang
        End Get
        Set(ByVal value)
            _tinhtrang = value
        End Set
    End Property

    'Khoitao
    Public Sub New(ByVal ten As String, ByVal trigia As Integer, ByVal dvt As Integer)
        Me._ten = ten
        Me._trigia = trigia
        Me._donvitinh = dvt
    End Sub

    'Update thong tin san pham
    Public Sub New(ByVal ma As Integer, ByVal ten As String, ByVal trigia As Integer, ByVal dvt As Integer)
        Me._ma = ma
        Me._ten = ten
        Me._trigia = trigia
        Me._donvitinh = dvt
    End Sub

    'Update tinhtrang
    Public Sub New(ByVal ma As Integer, ByVal tt As Integer)
        Me._ma = ma
        Me._tinhtrang = tt
    End Sub

    'Search
    Public Sub New(ByVal ma As Integer)
        Me._ma = ma
    End Sub
End Class
